﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;

using Business = VietStar.Library.Business;
using Entity = VietStar.Library.Entity;


public partial class controls_client_comment : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            int nId = Convert.ToInt32(Request.QueryString["news"].ToString());
            int cType = Convert.ToInt32(Request.QueryString["type"].ToString());
            BindCommentByNews(nId);
        }
    }

    private void BindCommentByNews(int id)
    {
        Business.Comment comment = new Business.Comment();
        List<Entity.Comment> list = new List<Entity.Comment>();
        list = comment.GetById(id);
        if (list.Count > 0)
            gvComment.DataSource = list;
        else
            gvComment.DataSource = null;
        gvComment.DataBind();
    }
    protected void btnSend_Click(object sender, EventArgs e)
    {
        try
        {

        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
}
